﻿<%@ Page Language="VB" Inherits="System.Web.Mvc.ViewPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Index</title>
</head>
<body>
   <%-- <div>
    <h1>My Tasks</h1>
               ... displaying all tasks
               <a href="/Home/Create">Add new Task</a>

    </div>--%>
    <div>
    <h1>My Tasks</h1>
               <ul>
                    <% For Each task As TaskList.Task In ViewData.Model%>
                         <li>
                              <% If task.IsCompleted Then%>
                                   <del>
                                        <%= task.EntryDate.ToString()%> 
                                        -- <%=task.Task%>
                                   </del>
                                   <a href="/Home/UnComplete/<%= task.Id.ToString() %>">Done</a>
                              <% Else%>                                   
                                   <%= task.EntryDate.ToString() %> 
                                   -- <%=task.Task%>
                                   <a href="/Home/Complete/<%= task.Id.ToString() %>">Active</a>
                              <% End If%>
                              <a href="/Home/Del/<%= task.Id.ToString() %>">Del</a>
                         </li>
                    <% Next%>
               </ul>
               <br /><br />
               <a href="/Home/Create">Add new Task</a>

    </div>
</body>
</html>
